From 89a4be6901256677b32b99c834e0b9281bbb1d46 Mon Sep 17 00:00:00 2001 From: "Liu, Jinsong" Date: Thu, 12 May 2011 08:52:47 +0100 Subject: [PATCH] x86/mca MCA minor bugfix This patch fix a minor bug, when in xen context and cannot safely return the mce break point, reset system; Signed-off-by: Liu, Jinsong --- xen/arch/x86/cpu/mcheck/mce_intel.c | 2 +- xen/include/public/sysctl.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/cpu/mcheck/mce_intel.c b/xen/arch/x86/cpu/mcheck/mce_intel.c index 9ec4355b6d..dbbf9751ef 100644 --- a/xen/arch/x86/cpu/mcheck/mce_intel.c +++ b/xen/arch/x86/cpu/mcheck/mce_intel.c @@ -355,7 +355,7 @@ static int mce_urgent_action(struct cpu_user_regs *regs, gstatus = mca_rdmsr(MSR_IA32_MCG_STATUS); /* Xen is not pre-emptible */ if ( !(gstatus & MCG_STATUS_RIPV) && !guest_mode(regs)) - return 0; + return -1; return mce_action(regs, mctc) == MCER_RESET ? -1 : 0; } diff --git a/xen/include/public/sysctl.h b/xen/include/public/sysctl.h index ac7551701b..c10a85d1f8 100644 --- a/xen/include/public/sysctl.h +++ b/xen/include/public/sysctl.h @@ -410,7 +410,7 @@ struct xen_sysctl_page_offline_op { #define PG_OFFLINE_MISC_MASK (0xFFUL << 4) -/* only valid when PG_OFFLINE_FAILED */ +/* valid when PG_OFFLINE_FAILED or PG_OFFLINE_PENDING */ #define PG_OFFLINE_XENPAGE (0x1UL << 8) #define PG_OFFLINE_DOM0PAGE (0x1UL << 9) #define PG_OFFLINE_ANONYMOUS (0x1UL << 10) -- 2.30.2